{extend name="public/base" /}
{block name="pjax_container"}
<?php
    $titleTypeName = '系统公告编辑/添加';
?>
<style>
    tr>th,
    td {
        text-align: center;
    }



    .content-header>.breadcrumb>li {
        color: #999;
    }

    .content-header>.breadcrumb>.active {
        color: #666;
    }

    .content-header {
        height: 51px;

    }

    .btn-primary {
        background-color: #1890FF;
        color: #fff;
        border: none;
        border-radius: 6px !important;
        margin-left: 15px;
        padding: 5px 10px;
    }

    .box-primary {
        border-top-color: #ecf0f5 !important;
        border-top-width: 16px;

    }

    .btn-primary:hover {
        background-color: #1890FF;
        color: #fff;
        border: none;
        opacity: .9;
        border-radius: 6px !important;
    }

    .delete-one {
        background-color: ff4141 !important;
        margin-left: 15px;
        border-radius: 6px;
        padding: 5px 8px;
    }

    .sreachs {
        background-color: #1890FF;
        color: #fff;
        border: none;
        border-radius: 6px !important;
        margin-left: 15px;
        padding: 7px 15px;
    }

    .nav-tabs-custom {
        margin-top: 16px;
    }
</style>
<section class="content-header">
    <ol class="breadcrumb">
        <li>配置管理</li>
        <li>系统公告</li>
        <li class="active">{$titleTypeName}</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="/{$Think.MODULE_NAME}/{$Think.CONTROLLER_NAME}/{$Think.ACTION_NAME}" onsubmit="return false" >
                <input type="hidden" name="id" value="{$info.id|default=0}" />
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">

                            <div class="form-group">
                                <label class="col-sm-2 control-label">标题</label>
                                <div class="col-sm-7">
                                    <input class="form-control" name="title" value="{$info['title']|default=''}" placeholder="">
                                </div>
                            </div>
                            <!--<div class="form-group">-->
                                <!--<label class="col-sm-2 control-label">排序</label>-->
                                <!--<div class="col-sm-7">-->
                                    <!--<input class="form-control" name="sort" value="{$info['sort']|default=''}" placeholder="">-->
                                <!--</div>-->
                            <!--</div>-->
                            <div class="form-group">
                                <label class="col-sm-2 control-label">公告截止时间</label>
                                <div class="col-sm-7">
                                    <input class="timepicker" name="end_time" value="{if condition="isset($info['end_time'])"}{:date('Y-m-d H:i:s',$info['end_time'])}{else:}{:date('Y-m-d',time())}{/if}" placeholder="公告截止时间"  style="margin: 0px 5px;padding-left: 3px;border: 1px solid #ccc;height: 28px;border-radius: 3px;" AUTOCOMPLETE="off">
                                </div>
                            </div>
                            {include file="form/textarea_clean" title="内容" name="content" data="isset($info['content']) ? $info['content'] : ''"/}
                        </div>
                    </div>

                    <div class="box-footer">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-7">
                            <div class="btn-group pull-right">
                                <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; 提交">提交</button>
                            </div>
                        </div>
                    </div>

                </div>
            </form>
        </div>
    </div>
</section>
<script type="application/javascript">
    $(document).ready(function () {
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language:"zh-CN"});

    })
    $(function(){
        $('.timepicker').datetimepicker({
            format: "{$timepickerFormat | default='YYYY-MM-DD HH:mm:ss'}",   //YYYY-MM-DD HH:mm:ss
            locale: moment.locale('zh-cn')
        });
    })
</script>
{/block}
